Skip to content

Create fumadocs documentation site at /apps/docs/#33

Merged
hotlong merged 10 commits intomainfrom
copilot/create-fumadocs-site
Feb 10, 2026
Merged

Create fumadocs documentation site at /apps/docs/#33
hotlong merged 10 commits intomainfrom
copilot/create-fumadocs-site

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 10, 2026

  • Create fumadocs site at /apps/docs/
  • Write comprehensive documentation (42 files, 9 sections)
  • Address review feedback:
    • Fix libraries/utilities.mdx — align feature-flags (isEnabled, FeatureFlagConfig), remote-config (refreshIntervalMs, getValue/getValueWithDefault), app-store-review (validateAppStoreReadiness, ReviewCheckItem)
    • Fix libraries/data.mdx — correct SyncQueueEntry shape (id: number, recordId required, payload: string, retries, errorMessage, updatedAt), correct ConflictInfo, fix OPERATOR_META to read-only usage
    • Fix libraries/security.mdx — correct buildPinningPolicy(apiUrl, pins) signature, validateCertificatePin(policy, certHash), addCheck(AuditCheckDefinition) shape
    • Fix libraries/monitoring.mdxflushIntervalMs, error codes (VALIDATION_ERROR, INTERNAL_ERROR), createPerformanceBenchmark with flat thresholds, createMemoryTracker with track/untrack/reportLeaks
    • Fix libraries/auth.mdx — rename duplicate const client to existingClient
    • Fix clipboard API: use writeText instead of ClipboardItem
    • Fix GitHub URL: add apps/docs/ prefix
    • Fix OG generateStaticParams: remove extra lang key
    • Fix rewrites: add /docs.mdx/llms.mdx/docs for index page
    • Verify build passes (102 pages generated)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 5 commits February 10, 2026 01:40
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…ring, and utilities pages

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@hotlong hotlong marked this pull request as ready for review February 10, 2026 01:51
Copilot AI review requested due to automatic review settings February 10, 2026 01:51
Copilot AI and others added 3 commits February 10, 2026 01:54
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Fumadocs-powered Next.js documentation site under apps/docs and wires it into the pnpm workspace, including a first pass at documentation content (architecture, components, hooks, libraries) plus LLM-friendly endpoints (raw MDX + llms.txt).

Changes:

  • Add apps/docs Next.js app configured for Fumadocs MDX, Tailwind, search, OG images, and LLM export routes.
  • Add initial docs content under apps/docs/content/docs with meta.json navigation ordering.
  • Update workspace and gitignore to accommodate the new docs app.

Reviewed changes

Copilot reviewed 66 out of 68 changed files in this pull request and generated 24 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Adds apps/* workspace packages.
apps/docs/tsconfig.json TypeScript config for the docs app.
apps/docs/source.config.ts Fumadocs collections/source configuration.
apps/docs/postcss.config.mjs PostCSS config for Tailwind integration.
apps/docs/package.json Docs app package scripts and dependencies.
apps/docs/next.config.mjs Next.js config with Fumadocs MDX + rewrites.
apps/docs/mdx-components.tsx MDX component mapping for Fumadocs UI.
apps/docs/lib/source.ts Fumadocs source loader + helpers (OG + LLM text).
apps/docs/lib/layout.shared.tsx Shared layout options + GitHub repo config.
apps/docs/lib/cn.ts Tailwind class merge helper for docs app.
apps/docs/content/docs/meta.json Top-level docs navigation ordering.
apps/docs/content/docs/index.mdx Docs home page content.
apps/docs/content/docs/getting-started/meta.json “Getting Started” section ordering.
apps/docs/content/docs/getting-started/index.mdx Getting started guide content.
apps/docs/content/docs/architecture/meta.json “Architecture” section ordering.
apps/docs/content/docs/architecture/index.mdx Architecture overview page.
apps/docs/content/docs/architecture/data-layer.mdx Data layer documentation page.
apps/docs/content/docs/architecture/offline-first.mdx Offline-first architecture page.
apps/docs/content/docs/components/meta.json “Components” section ordering.
apps/docs/content/docs/components/index.mdx Components overview page.
apps/docs/content/docs/components/renderers.mdx View renderers documentation page.
apps/docs/content/docs/components/ui-primitives.mdx UI primitives documentation page.
apps/docs/content/docs/components/common.mdx Common components documentation page.
apps/docs/content/docs/components/actions.mdx Action components documentation page.
apps/docs/content/docs/components/query.mdx Query components documentation page.
apps/docs/content/docs/hooks/meta.json “Hooks” section ordering.
apps/docs/content/docs/hooks/index.mdx Hooks reference landing page.
apps/docs/content/docs/hooks/data-hooks.mdx Data hooks documentation page.
apps/docs/content/docs/hooks/auth-hooks.mdx Auth/security hooks documentation page.
apps/docs/content/docs/hooks/feature-hooks.mdx Feature hooks documentation page.
apps/docs/content/docs/hooks/analytics-hooks.mdx Analytics hooks documentation page.
apps/docs/content/docs/hooks/ui-hooks.mdx UI hooks documentation page.
apps/docs/content/docs/authentication/meta.json “Authentication” section ordering.
apps/docs/content/docs/authentication/index.mdx Authentication documentation page.
apps/docs/content/docs/libraries/meta.json “Libraries” section ordering.
apps/docs/content/docs/libraries/index.mdx Libraries landing page (cards).
apps/docs/content/docs/libraries/auth.mdx Auth libraries documentation page.
apps/docs/content/docs/libraries/data.mdx Data libraries documentation page.
apps/docs/content/docs/libraries/security.mdx Security libraries documentation page.
apps/docs/content/docs/libraries/monitoring.mdx Monitoring libraries documentation page.
apps/docs/content/docs/libraries/utilities.mdx Utilities libraries documentation page.
apps/docs/components/ai/page-actions.tsx “Copy markdown” + “Open in …” actions UI.
apps/docs/app/layout.tsx Root layout + provider + global CSS import.
apps/docs/app/global.css Tailwind + fumadocs UI CSS imports.
apps/docs/app/(home)/layout.tsx Home layout wrapper.
apps/docs/app/(home)/page.tsx Landing page content for docs app.
apps/docs/app/docs/layout.tsx Docs layout using Fumadocs page tree.
apps/docs/app/docs/[[...slug]]/page.tsx Docs page renderer + metadata + GitHub link.
apps/docs/app/api/search/route.ts Server search endpoint from Fumadocs source.
apps/docs/app/og/docs/[...slug]/route.tsx OG image generation route for docs pages.
apps/docs/app/llms.txt/route.ts LLM index (llms.txt) route.
apps/docs/app/llms-full.txt/route.ts Aggregated full-text LLM export route.
apps/docs/app/llms.mdx/docs/[[...slug]]/route.ts Raw processed markdown endpoint per doc page.
apps/docs/README.md Docs app README (generated template).
apps/docs/.gitignore Docs app gitignore (build + generated artifacts).
.gitignore Adds docs app build artifacts to root ignore list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +50 to +61
import { createFeatureFlagManager } from '@/lib/feature-flags';

const manager = createFeatureFlagManager({
flags: {
'new-dashboard': { enabled: true, rollout: 50 },
'ai-search': { enabled: false },
},
});

// Evaluate a flag (considers rollout percentage)
const isEnabled = manager.evaluate('new-dashboard', userId);
```
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The createFeatureFlagManager sample uses a { flags: { ... }, rollout } config and manager.evaluate(...), but lib/feature-flags.ts uses { defaults?: FeatureFlag[], refreshIntervalMs?, endpoint? } and exposes isEnabled(...). Please align the example with the implemented API and naming (rolloutPercentage, etc.).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in abd0517. Updated to use FeatureFlagConfig with defaults: FeatureFlag[], refreshIntervalMs, and manager.isEnabled() / manager.setUserId() matching the actual API.

Comment on lines +70 to +82
import { createRemoteConfigManager } from '@/lib/remote-config';

const config = createRemoteConfigManager({
endpoint: 'https://server.objectstack.com/config',
pollInterval: 300000, // 5 minutes
});

// Fetch latest config
await config.refresh();

// Get a value (falls back to cached)
const value = config.get('maxUploadSizeMB'); // 10
```
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The createRemoteConfigManager example uses pollInterval and config.get(...), but lib/remote-config.ts uses refreshIntervalMs and methods like getValue(...) / getValueWithDefault(...). Please update the option/method names so the snippet is copy/paste-able.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in abd0517. Updated to refreshIntervalMs and config.getValue<T>() / config.getValueWithDefault() matching the actual API.

Comment on lines +89 to +93
import type { ReviewChecklist } from '@/lib/app-store-review';

// Validates against expo app.json config
// Checks: metadata, assets, privacy, compliance
```
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReviewChecklist doesn’t appear to exist in lib/app-store-review.ts (the file exports ReviewCheckItem, AppConfig, ReviewReport, and validateAppStoreReadiness). Consider updating the docs to reference the actual exported types/functions so readers aren’t pointed at non-existent APIs.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in abd0517. Updated to reference the actual exports: validateAppStoreReadiness, ReviewCheckItem, AppConfig, and ReviewReport.

Comment on lines +10 to +12
export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
const params = await props.params;
const page = source.getPage(params.slug);
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file uses PageProps<'/docs/[[...slug]]'> but there’s no local/imported definition for PageProps in the repo. Unless next typegen has been run and its generated types are available, tsc/CI will fail with an unknown identifier. Prefer using explicit props typing (e.g., { params: { slug?: string[] } }) or importing a stable type instead of relying on generated globals.

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +5

export default function Layout({ children }: LayoutProps<'/docs'>) {
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This layout signature uses LayoutProps<'/docs'> but there’s no local/imported definition for LayoutProps in the repo. Unless generated route types exist at build time, tsc/CI will fail. Consider using a plain { children: React.ReactNode } prop type (or importing a stable type) to avoid depending on generated globals.

Suggested change
export default function Layout({ children }: LayoutProps<'/docs'>) {
import type React from 'react';
export default function Layout({ children }: { children: React.ReactNode }) {

Copilot uses AI. Check for mistakes.
Comment on lines +81 to +93
import { createMemoryTracker } from '@/lib/memory-profiler';

const tracker = createMemoryTracker({
leakThreshold: 10, // Report after 10 unmatched mounts
});

// Track component lifecycle
tracker.onMount('ContactList');
tracker.onUnmount('ContactList');

// Check for leaks
const leaks = tracker.getLeaks();
```
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The memory profiler example doesn’t match lib/memory-profiler.ts. The implementation has createMemoryTracker() with track/untrack/reportLeaks, not { leakThreshold } options and onMount/onUnmount/getLeaks methods. Updating this will avoid readers implementing against a non-existent API.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in abd0517. Updated to use createMemoryTracker() (no constructor args), track(label, cleanup), untrack(label), reportLeaks(thresholdMs), and disposeAll().

Comment on lines +3 to +4

export default function Layout({ children }: LayoutProps<'/'>) {
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This layout signature uses LayoutProps<'/'> but there’s no local/imported definition for LayoutProps in the repo. Unless generated route types exist at build time, tsc/CI will fail. Consider using a plain { children: React.ReactNode } prop type (or importing a stable type) instead.

Suggested change
export default function Layout({ children }: LayoutProps<'/'>) {
import type { ReactNode } from 'react';
export default function Layout({ children }: { children: ReactNode }) {

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +8
export async function GET(_req: Request, { params }: RouteContext<'/llms.mdx/docs/[[...slug]]'>) {
const { slug } = await params;
const page = source.getPage(slug);
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RouteContext<'/llms.mdx/docs/[[...slug]]'> is used but there’s no local/imported definition for RouteContext in the repo. Unless generated route types exist at build time, tsc/CI will fail. Consider typing the context as { params: { slug?: string[] } } (or similar) to avoid depending on generated globals.

Copilot uses AI. Check for mistakes.
Comment thread apps/docs/package.json
Comment on lines +17 to +20
"next": "16.1.6",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"tailwind-merge": "^3.4.0"
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package pins react/react-dom to versions that differ from the workspace root. In a monorepo this often leads to multiple React copies and peer-dep conflicts (especially with Next). Consider aligning React versions with the root package (or using workspace protocol) to avoid duplication and hard-to-debug runtime issues.

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +25
// Create client with auth token
const client = createObjectStackClient(authToken);

// Retrieve existing singleton
const client = getObjectStackClient();
```
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code sample declares const client twice, which won’t compile and is confusing for readers. Consider showing one approach, or rename the second variable (e.g. existingClient) to demonstrate retrieving the singleton separately.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in abd0517. Renamed the second variable to existingClient.

@hotlong
Copy link
Copy Markdown
Contributor

hotlong commented Feb 10, 2026

@copilot 继续

Copilot AI changed the title [WIP] Create fumadocs site in apps/docs folder Create fumadocs documentation site at /apps/docs/ Feb 10, 2026
Copilot AI requested a review from hotlong February 10, 2026 02:02
…e issues

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 10, 2026

@copilot 继续

All review feedback has been addressed in abd0517 — documentation samples now match the actual source APIs, and template code issues (clipboard API, GitHub URL prefix, OG params, rewrites) are fixed. Build passes with 102 pages generated.

@hotlong hotlong merged commit 4815b0b into main Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants